﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="kecheng_search_free.aspx.cs"
    Inherits="kecheng_kecheng_search_free" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>课程查询</title>
    <style type="text/css">
        .font33
        {
            font-family: 微软雅黑;
            font-size: 14px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table width="1000px" border="0" cellpadding="0" cellspacing="0">
            <tr valign="top">
                <td colspan="2" style="height: 7px; width: 1000px;">
                    &nbsp;&nbsp; <a id="HyperLink1" href="../index.aspx" style="font-size:13px;">返回登录页面</a>
                </td>
            </tr>
            <tr valign="top">
                <td colspan="2" height="7" style="text-align: center; width: 1000px;" class="font33">
                    <strong>查询结果</strong>
                </td>
            </tr>
            <tr valign="top">
                <td colspan="2" style="width: 1000px">
                    <table width="1000px" border="1" align="center" cellpadding="4" cellspacing="0">
                        <tr>
                            <td height="90" colspan="2" align="left" valign="top">
                                <table border="0" width="100%">
                                    <tr>
                                        <td style="width: 60%; vertical-align: top;" class="font33">
                                            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1"
                                                AllowPaging="True" AllowSorting="True" OnRowDataBound="GridView1_RowDataBound"
                                                OnSelectedIndexChanging="GridView1_SelectedIndexChanging" DataKeyNames="id" CellPadding="4"
                                                Font-Size="10pt" ForeColor="Black" GridLines="Vertical" Width="614px" PageSize="13"
                                                BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="0px"
                                                CssClass="font33">
                                                <Columns>
                                                    <asp:BoundField HeaderText="编号">
                                                        <HeaderStyle Wrap="False" />
                                                        <ItemStyle Wrap="False" />
                                                    </asp:BoundField>
                                                    <asp:CommandField HeaderText="查看详细" SelectText="查看详细" ShowSelectButton="True">
                                                        <HeaderStyle Wrap="False" />
                                                        <ItemStyle Wrap="False" />
                                                    </asp:CommandField>
                                                    <asp:BoundField DataField="id" HeaderText="代码" SortExpression="id">
                                                        <HeaderStyle Wrap="False" />
                                                        <ItemStyle Wrap="False" />
                                                    </asp:BoundField>
                                                    <asp:TemplateField HeaderText="课程">
                                                        <ItemTemplate>
                                                            <%--<a href="javascript:void(0)" class="font33" id='<%#Eval("id") %>'>
                                                                <%#Eval("name") %></a>--%><label><%#Eval("name") %></label>
                                                        </ItemTemplate>
                                                        <HeaderStyle Wrap="False" />
                                                        <ItemStyle Wrap="False" />
                                                    </asp:TemplateField>
                                                    <asp:BoundField DataField="username1" HeaderText="任课老师" SortExpression="username1">
                                                        <HeaderStyle Wrap="False" />
                                                        <ItemStyle Wrap="False" />
                                                    </asp:BoundField>
                                                    <asp:BoundField DataField="xuefei" HeaderText="收费" SortExpression="xuefei">
                                                        <HeaderStyle Wrap="False" />
                                                        <ItemStyle Wrap="False" />
                                                    </asp:BoundField>
                                                </Columns>
                                                <RowStyle BackColor="#F7F7DE" />
                                                <SelectedRowStyle BackColor="#80ba21" Font-Bold="True" ForeColor="White" />
                                                <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                                                <HeaderStyle BackColor="#D9EDB2" Font-Bold="True" ForeColor="Black" Font-Underline="False" />
                                                <FooterStyle BackColor="#CCCC99" />
                                                <AlternatingRowStyle BackColor="White" />
                                            </asp:GridView>
                                        </td>
                                        <td style="width: 40%; vertical-align: top;">
                                            <asp:DetailsView ID="DetailsView1" runat="server" Height="357px" Width="347px" AutoGenerateRows="False"
                                                DataSourceID="SqlDataSource2" CellPadding="4" ForeColor="#333333" GridLines="None"
                                                CssClass="font33">
                                                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                                <CommandRowStyle BackColor="#E2DED6" Font-Bold="True" Wrap="True" />
                                                <EditRowStyle BackColor="#999999" />
                                                <RowStyle BackColor="#F7F7DE" />
                                                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                                <FieldHeaderStyle BackColor="#E9ECF1" Font-Bold="True" Width="50px" />
                                                <HeaderStyle BackColor="#D9EDB2" Font-Bold="True" ForeColor="Black" Font-Underline="False" />
                                                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                                <Fields>
                                                    <asp:BoundField DataField="name" HeaderText="名称" SortExpression="name" />
                                                    <asp:BoundField DataField="username1" HeaderText="老师" SortExpression="username1" />
                                                    <asp:BoundField DataField="jigou" HeaderText="机构" SortExpression="jigou" />
                                                    <asp:BoundField DataField="kechenglx" HeaderText="类型" SortExpression="kechenglx" />
                                                    <asp:BoundField DataField="fabuzt" HeaderText="发布" SortExpression="fabuzt" />
                                                    <asp:BoundField DataField="xuefei" HeaderText="学费" SortExpression="xuefei" />
                                                    <asp:BoundField DataField="jifen" HeaderText="积分" SortExpression="jifen" />
                                                    <asp:TemplateField HeaderText="简介">
                                                        <ItemTemplate>
                                                            <asp:TextBox ID="TextBox1" runat="server" Height="270px" Text='<%# Eval("jianjie") %>'
                                                                TextMode="MultiLine" Width="270px" ReadOnly="true"></asp:TextBox>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                </Fields>
                                            </asp:DetailsView>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:gConnectionString %>"
                                                SelectCommand="SELECT k.[id],k.[name],k.[xuefei],a.[username1] FROM [kecheng] k inner join [account] a on k.[laoshi]=a.[username] WHERE [confirm]=@confirm AND [fabuzt]=@fabuzt">
                                                <SelectParameters>
                                                    <asp:Parameter Type="String" Name="confirm" DefaultValue="终审通过" />
                                                    <asp:Parameter Type="String" DefaultValue="公开课程" Name="fabuzt" />
                                                </SelectParameters>
                                            </asp:SqlDataSource>
                                        </td>
                                        <td>
                                            <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:gConnectionString %>">
                                            </asp:SqlDataSource>
                                        </td>
                                    </tr>
                                </table>
                                <br />
                                <br />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
